package com.zbxx.practice.designpattern.watch.normal;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author 万仁杰
 * @date 2019/06/04
 */
@Getter
@Setter
@ToString
public class ConcreteObserver implements Observer {

    private String content;

    private String username;

    private String things;

    /**
     * 同步状态
     * @param subject
     */
    @Override
    public void update(Subject subject) {
        this.content =((ConcreteSubject)subject).getContent();
        System.out.println(this.username+",收到天气信息:"+this.content+",提醒事项"+this.things);
    }



}
